package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.WxUsers;
import com.example.demo.mapper.WxUsersMapper;
import com.example.demo.service.IWxUsersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 微信用户表 服务实现类
 * </p>
 *
 * @author ZhaoJianHui
 * @since 2025-04-28
 */
@Service
public class WxUsersServiceImpl extends ServiceImpl<WxUsersMapper, WxUsers> implements IWxUsersService {
    /**
     * 分页查询
     * @param pageNo
     * @param limit
     * @return
     */
    public List<WxUsers> queryPageList(Integer pageNo, Integer limit) {
        IPage<WxUsers> page = new Page<>(pageNo, limit);
        IPage<WxUsers> userPage = this.page(page); // 调用 page 方法
        // 获取分页结果
        return userPage.getRecords();
    }
}
